<?php

namespace App\Models;

use Carbon\Carbon;
use Slowlyo\OwlAdmin\Models\BaseModel as Model;

/**
 * 套餐记录
 */
class PreDzlabQwenPack extends Model
{

	protected $table = 'pre_dzlab_qwen_packs';

	public $timestamps = false;

	public $connection = 'bbs';

	public $fillable = [ 'uid', 'name', 'total_num', 'ext', 'expire_at', 'surplus_num', 'uesd_num', 'type', 'created_at'];

	public function user()
	{
		return $this->hasOne(PreCommonMember::class,'uid','uid');
	}
	public function getCreatedAtAttribute($value)
	{
		return Carbon::parse($value)->format('Y-m-d H:i:s');
	}
	public function getExpireAtAttribute($value){
		return Carbon::parse($value)->format('Y-m-d H:i:s');
	}

}
